home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.n / glob.n < prev    next >
Text File  |  1995-07-25  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4.      gggglllloooobbbb((((nnnn))))                     TTTTccccllll ((((7777....0000))))                     gggglllloooobbbb((((nnnn))))
  5.  
  6.  
  7.  
  8.      _________________________________________________________________
  9.  
  10.      NNNNAAAAMMMMEEEE
  11.           glob - Return names of files that match patterns
  12.  
  13.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.           gggglllloooobbbb ?_s_w_i_t_c_h_e_s? _p_a_t_t_e_r_n ?_p_a_t_t_e_r_n ...?
  15.      _________________________________________________________________
  16.  
  17.  
  18.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.           This command performs file name ``globbing''  in  a  fashion
  20.           similar  to  the  csh shell.  It returns a list of the files
  21.           whose names match any of the _p_a_t_t_e_r_n arguments.
  22.  
  23.           If the initial arguments to gggglllloooobbbb start with ---- then they  are  |
  24.           treated  as  switches.  The following switches are currently  |
  25.           supported:                                                    |
  26.  
  27.           ----nnnnooooccccoooommmmppppllllaaaaiiiinnnn                                                        ||
  28.                          Allows  an  empty list to be returned without  |
  29.                          error;   without  this  switch  an  error  is  |
  30.                          returned if the result list would be empty.    |
  31.  
  32.           --------                                                                 ||
  33.                          Marks  the  end  of  switches.   The argument  |
  34.                          following this  one  will  be  treated  as  a  |
  35.                          _p_a_t_t_e_r_n even if it starts with a ----....
  36.  
  37.           The _p_a_t_t_e_r_n arguments  may  contain  any  of  the  following
  38.           special characters:
  39.  
  40.           ????         Matches any single character.
  41.  
  42.           ****         Matches any sequence of zero or more characters.
  43.  
  44.           [[[[_c_h_a_r_s]]]]   Matches any single character in _c_h_a_r_s.   If  _c_h_a_r_s
  45.                     contains  a  sequence  of  the  form  _a----_b then any
  46.                     character between _a and _b (inclusive) will match.
  47.  
  48.           \\\\_x        Matches the character _x.
  49.  
  50.           {{{{_a,,,,_b,,,,...} Matches any of the strings _a, _b, etc.
  51.  
  52.           As with csh, a  ``.'' at the beginning of a file's  name  or
  53.           just  after  a ``/'' must be matched explicitly or with a {}
  54.           construct.   In  addition,  all  ``/''  characters  must  be
  55.           matched explicitly.
  56.  
  57.           If the first character in a _p_a_t_t_e_r_n is ``~'' then it  refers
  58.           to  the  home  directory for the user whose name follows the
  59.           ``~''.  If the ``~'' is followed immediately by  ``/''  then
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 7/17/95)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      gggglllloooobbbb((((nnnn))))                     TTTTccccllll ((((7777....0000))))                     gggglllloooobbbb((((nnnn))))
  71.  
  72.  
  73.  
  74.           the value of the HOME environment variable is used.
  75.  
  76.           The gggglllloooobbbb command differs from  csh  globbing  in  two  ways.
  77.           First,  it  does  not  sort  its  result list (use the llllssssoooorrrrtttt
  78.           command if you want the list  sorted).   Second,  gggglllloooobbbb  only  |
  79.           returns  the  names of files that actually exist;  in csh no  |
  80.           check for existence is made unless a pattern contains  a  ?,  |
  81.           *, or [] construct.
  82.  
  83.  
  84.      KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  85.           exist, file, glob, pattern
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 7/17/95)
  130.  
  131.  
  132.  
  133.